<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="com.manage.colligationQuery.ColligationQueryOfMsgerVo"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link href="<%=basePath%>/images/css.css" rel="stylesheet" type="text/css">
<script>

	
	function submit1(){
		var plateNumber = document.getElementById('msgNum').value;
		if(plateNumber==""){
			alert('请填写信息员序号!');
			return false;
		}
	}
	
	function print(uri){
		alert(uri);
		window.open(uri);
	}
</script>
<%	
	String uri = "";
	ColligationQueryOfMsgerVo vo = new ColligationQueryOfMsgerVo();
	if(request.getAttribute("colligationQueryOfMsgerVo") !=null){
		 vo = (ColligationQueryOfMsgerVo)request.getAttribute("colligationQueryOfMsgerVo");
		 uri = basePath+"print/printMessager.action?method=printMessager&ids="+vo.getId();
	}
 %>
</head>

<body class="bg_003">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="201" height="30" align="center" background="<%=basePath%>/images/016.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25"><img src="<%=basePath%>/images/1.png" width="16" height="16"></td>
        <td><strong>信息员信息查询</strong></td>
      </tr>
    </table></td>
    <td align="right" background="<%=basePath%>/images/017.jpg" class="zi_006">综合查询</td>
    <td width="39"><img src="<%=basePath%>/images/018.jpg" width="39" height="30"></td>
  </tr>
</table>
<form id="queryForm" name="queryForm" action="<%=path %>/system/colligationQueryOfMsger.action" method="post">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" bgcolor="#e1e1e2"></td>
        <td height="100" align="center">
        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e1e1e1">
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">信息员序号：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.appointmentnum" type="text" id="msgNum" size="14" value=<%=vo.getAppointmentnum() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">性别：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.gender" size="14" type="text" id="name" width="100%" value=<%=vo.getGender() %>></td>
          </tr>
          
          <tr>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">姓名：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.name" size="14" type="text" id="name" width="100%" value=<%=vo.getName() %>></td>
          </tr>
        </table>
        
         </td>
        <td width="1" bgcolor="#e1e1e2"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  			<%	
  					if(vo.getPosition()==null){
  						vo.setPosition("无");
  					}else{
	  					 if(vo.getPosition().equals("1")){
	  						vo.setPosition("中队长");
	  					}else if(vo.getPosition().equals("2")){
	  						vo.setPosition("副中队长");
	  					}else if(vo.getPosition().equals("3")){
	  						vo.setPosition("指导员");
	  					}else if(vo.getPosition().equals("4")){
	  						vo.setPosition("助理员");
	  					}else if(vo.getPosition().equals("5")){
	  						vo.setPosition("民警");
	  					}else if(vo.getPosition().equals("6")){
	  						vo.setPosition("协警");
	  					}
  					}	
  					
  					if(vo.getGender()==null){
  						vo.setGender("无");
  					}else if(vo.getGender().equals("0")){
  						vo.setGender("男");
  					}else{
  						vo.setGender("女");
  					}
  					
  					if(vo.getReligion()==null){
  						vo.setReligion("无");
  					}else if(vo.getReligion().equals("0")){
  						vo.setReligion("党员");
  					}else if(vo.getReligion().equals("1")){
  						vo.setReligion("团员");
  					}else if(vo.getReligion().equals("2")){
  						vo.setReligion("群众");
  					}
  					
  					if(vo.getAppointmentnum()==null){
  						vo.setAppointmentnum("无");
  					}
  					if(vo.getName()==null){
  						vo.setName("无");
  					}
  					if(vo.getArea()==null){
  						vo.setArea("无");
  					}
  					if(vo.getApppintmentdate()==null){
  						vo.setApppintmentdate("无");
  					}
  					if(vo.getIdcardnumber()==null){
  						vo.setIdcardnumber("无");
  					}
  					if(vo.getAddress()==null){
  						vo.setAddress("无");
  					}
  					if(vo.getPhonenumber()==null){
  						vo.setPhonenumber("无");
  					}
  					if(vo.getDetachment()==null){
  						vo.setDetachment("无");
  					}else if(vo.getDetachment().equals("1")){
  						vo.setDetachment("五里明");
  					}else if(vo.getDetachment().equals("2")){
  						vo.setDetachment("五站");
  					}else if(vo.getDetachment().equals("3")){
  						vo.setDetachment("昌五");
  					}else if(vo.getDetachment().equals("4")){
  						vo.setDetachment("宋站");
  					}
  					
  					if(vo.getCorporation()==null){
  						vo.setCorporation("无");
  					}
  			 %>
  <!-- 所属人信息 -->
        <table id='persontable' width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e1e1e1">
          <tr>
          <tr>
	        <td width="25" bgcolor="#CCFFCC"><img src="<%=basePath%>/images/1.png" width="16" height="16"></td>
	        <td bgcolor="#CCFFCC"><strong>信息员详细信息面板</strong></td>
          </tr>
			<tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">姓名：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.name" type="text" id="name" size="14" disabled='true' value=<%=vo.getName() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">性别：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfMsgerVo.gender" type="text" id="sex" width="100%" disabled='true' value=<%=vo.getGender() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">职务：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.position" type="text" id="duties" size="14" disabled='true' value=<%=vo.getPosition() %>></td>
          </tr>
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">政治面貌：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.religion" type="text" id="political" size="14" disabled='true' value=<%=vo.getReligion() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">联系电话：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfMsgerVo.phonenumber" type="text" id="mobile" width="100%" disabled='true' value=<%=vo.getPhonenumber() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">身份证：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.idcardnumber" type="text" id="idcard" size="14" disabled='true' value=<%=vo.getIdcardnumber() %>></td>
          </tr>
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">工作单位：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.corporation" type="text" id="wordaddress" size="14" disabled='true' value=<%=vo.getCorporation() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">现居地址：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfMsgerVo.address" type="text" id="liveaddress" width="100%" disabled='true' value=<%=vo.getAddress() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">负责区域：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.area" type="text" id="responsible" size="14" disabled='true' value=<%=vo.getArea() %>></td>
          </tr>
          
           <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">聘用编号：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.appointmentnum" type="text" id="employnum" size="14" disabled='true' value=<%=vo.getAppointmentnum() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">聘用日期：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfMsgerVo.apppintmentdate" type="text" id="employdate" width="100%" disabled='true' value=<%=vo.getApppintmentdate() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">所属中队：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfMsgerVo.detachment" type="text" id="squadron" size="14" disabled='true' value=<%=vo.getDetachment() %>></td>
          </tr>
          
        </table>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="5" height="5"><img src="<%=basePath%>/images/019.jpg" width="5" height="5"></td>
        <td width="100%" height="5" class="bg_002"></td>
        <td width="5" height="5"><img src="<%=basePath%>/images/020.jpg" width="5" height="5"></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" align="right"><input type="submit" name="button" id="button" value="打 印" onclick="print('<%=uri %>')"></td>
  </tr>
</table>
<table width="603" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="26">&nbsp;</td>
  </tr>
</table>
</body>
</html>